package com.purchase.ml.mapper.order;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.purchase.ml.entity.order.SysOrderMsg;
import com.purchase.ml.entity.order.SysPayinfo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

/**
 * @description: 订单
 * @author kyyang
 * @date 2021/2/28 19:55
 * @version 1.0
 */
@Mapper
@Repository
public interface SysPayInfoMapper extends BaseMapper<SysPayinfo> {
    @Update("update sys_payinfo set state=#{state} where pay_id=#{payId}")
    int updatePayinfoStateByPayId(@Param("payId") Long payId, @Param("state") Integer state);

//    @Delete("delete from sys_payinfo where pay_id = #{payId} and state = 0")
//    void checkAndDelete(@Param("payId") Long payId, @Param("state") Integer state);
}
